<template>
  <div class="posterRecord">
    <div class="org-tree">
      <organization @onSearch="searchFun" :statisticsNum="'noteNumber'" :statisticalType="5"></organization>
    </div>
    <div class="posterRecordRight">
      <note ref="note" />
    </div>
  </div>
</template>

<script>
  import organization from './components/organzation.vue'

  import note from './components/noteLog'
  export default {
    components: { note, organization },
    methods: {
      searchFun(orgCheck) {
        console.log(orgCheck)
        this.$refs.note.init({
          orgIds: orgCheck.orgOfficeId
            ? orgCheck.orgOfficeId
            : orgCheck.orgCompanyId
            ? orgCheck.orgCompanyId
            : orgCheck.orgDivisionId,
          housesId: orgCheck.buildingId
        })
      }
    }
  }
</script>
<style lang="scss" scoped>
  .posterRecord {
    padding: 20px;
    height: 100%;
    width: 100%;
    display: flex;

    .posterRecordRight {
      width: calc(100% - 320px);
      flex: 1;
      // height: 100%;
      // width: 100%;
      border: 1px solid #ccc;
      border-radius: 8px;
    }

    ::v-deep .ivu-tree-title {
      width: calc(100% - 15px);
    }
  }
</style>
